<comment>
  字符串转数组
</comment>
<template>
  <div>
    <area-cascade v-model="areaCasResult" />
  </div>
</template>
<script>
import AreaCascade from '@/components/AreaCascade'
export default {
  components: {
    AreaCascade
  },
  data() {
    return {
      areaCasResult: {
        province: '150000',
        city: '150400',
        country: '150421',
        address: ''
      },
      // 新增编辑界面数据
      dataForm: {
        province: '',
        city: '',
        country: '',
        address: ''
      }
    }
  },
  // 地址使用必须项
  watch: {
    // 数据回显
    areaCasResult: {
      immediate: true,
      handler(val) {
        this.dataForm.province = val.province
        this.dataForm.city = val.city
        this.dataForm.country = val.country
        this.dataForm.address = val.address
      }
    }
  },
  created() {
  },
  methods: {
    test() {
      console.log(this.dataForm)
    }
  }
}
</script>
<style lang="scss">
</style>
